################################################################################### 
## 
## Hack Title:    Add new field to profile
## Hack Version:  1.2.1
## optional Part: Display new field in memberlist 1.0
## Author         Acid
## Support:	  http://www.phpbbhacks.com/forums
##
## Description:   If you want to display the new fields in memberlist and if you
##		  want to sort it..
##		  If youve added more than one field duplicate the following
##		  steps and change "music" (be aware of the spelling).
##
## Required:      addfield_english.txt
##
## Files to edit: 2
##		  memberlist.php
##                templates/xxx/memberlist_body.tpl
##
################################################################################### 
## 
## Installation/Author Notes: 
## First always backup the files that you're going to edit. 
## 
################################################################################### 
##
## Versions:
##
## 1.0   - optional part added
##
################################################################################### 
# 
#-----[ OPEN ]------------------------------------------
#  
# memberlist.php
# 
#-----[ FIND ]---------------------------------------------------
# 
$mode_types_text = array($lang['Sort_Joined'], $lang['Sort_Username'], $lang['Sort_Location'], $lang['Sort_Posts'], $lang['Sort_Email'],  $lang['Sort_Website'], $lang['Sort_Top_Ten']);
$mode_types = array('joindate', 'username', 'location', 'posts', 'email', 'website', 'topten');

# 
#-----[ IN-LINE FIND ]---------------------------------------------------
# 
$lang['Sort_Location']

# 
#-----[ IN-LINE ADD ]---------------------------------------------------
# 
, $lang['Music']

# 
#-----[ IN-LINE FIND ]---------------------------------------------------
# 
'location'

# 
#-----[ IN-LINE ADD ]---------------------------------------------------
# 
, 'music'

# 
#-----[ FIND ]---------------------------------------------------
# 
	'L_FROM' => $lang['Location'],

# 
#-----[ ADD BELOW ]---------------------------------------------------
# 
	'L_MUSIC' => $lang['Music'],

# 
#-----[ FIND ]---------------------------------------------------
# 
		case 'location':
			$order_by = "user_from $sort_order LIMIT $start, " . $board_config['topics_per_page'];
			break;

# 
#-----[ ADD BELOW ]---------------------------------------------------
# 
		case 'music':
			$order_by = "user_music $sort_order LIMIT $start, " . $board_config['topics_per_page'];
			break;

# 
#-----[ FIND ]---------------------------------------------------
# 
$sql = "SELECT username, user_id, user_viewemail, user_posts, user_regdate, user_from, user_website, user_email, user_icq, user_aim, user_yim, user_msnm, user_avatar, user_avatar_type, user_allowavatar 
	FROM " . USERS_TABLE . "

# 
#-----[ IN-LINE FIND ]---------------------------------------------------
# 
user_from

# 
#-----[ IN-LINE ADD ]---------------------------------------------------
# 
, user_music

# 
#-----[ FIND ]---------------------------------------------------
# 
		$from = ( !empty($row['user_from']) ) ? $row['user_from'] : '&nbsp;';

# 
#-----[ ADD BELOW ]---------------------------------------------------
# 
		$music = ( !empty($row['user_music']) ) ? $row['user_music'] : '&nbsp;';

# 
#-----[ FIND ]---------------------------------------------------
# 
			'FROM' => $from,

# 
#-----[ ADD BELOW ]---------------------------------------------------
# 
			'MUSIC' => $music,


# 
#-----[ OPEN ]------------------------------------------
#  
# templates/xxx/memberlist_body.tpl
# 
#-----[ FIND ]---------------------------------------------------
# 
	  <th class="thTop" nowrap="nowrap">{L_FROM}</th>

# 
#-----[ ADD BELOW ]---------------------------------------------------
# 
	  <th class="thTop" nowrap="nowrap">{L_MUSIC}</th>

# 
#-----[ FIND ]---------------------------------------------------
# 
	  <td class="{memberrow.ROW_CLASS}" align="center" valign="middle"><span class="gen">{memberrow.FROM}</span></td>

# 
#-----[ ADD BELOW ]---------------------------------------------------
# 
	  <td class="{memberrow.ROW_CLASS}" align="center" valign="middle"><span class="gen">{memberrow.MUSIC}</span></td>

# 
#-----[ FIND ]---------------------------------------------------
# 
	  <td class="catbottom" colspan="8" height="28">&nbsp;</td>

# 
#-----[ REPLACE WITH ]---------------------------------------------------
# 
	  <td class="catbottom" colspan="9" height="28">&nbsp;</td>


################################################################################### 
################################################################################### 
###################################################################################